package hcn.protocol.brandnew.zhenliao.jianyan;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 检验报告列表查询-响应消息(成功) - ODS_03050200_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class LabReportQueryListResponse {

    /**
     * 总记录数
     */
    @XmlElement(name = "Total")
    private Long total;
    /**
     * 检验报告集合
     */
    @XmlElementWrapper(name = "InspectionTestRecords")
    @XmlElement(name = "InspectionTestRecord")
    private List<InspectionTestRecord> inspectionTestRecords;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class InspectionTestRecord {

        /**
         * 就诊机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 就诊机构名称
         */
        @XmlElement(name = "VisitOrganizationName")
        private String visitOrganizationName;
        /**
         * 患者类型代码
         */
        @XmlElement(name = "PatientType")
        @DictionaryMapping("CV09_00_404")
        private String patientType;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 年龄
         */
        @XmlElement(name = "AgeValue")
        private Short ageValue;
        /**
         * 年龄单位
         */
        @XmlElement(name = "AgeUnit")
        private String ageUnit;
        /**
         * 检验标本号
         */
        @XmlElement(name = "SampleNo")
        private String sampleNo;
        /**
         * 检验报告单编号
         */
        @XmlElement(name = "ReportId")
        private String reportId;
        /**
         * 检验项目名称
         */
        @XmlElement(name = "LabOrderItemName")
        private String labOrderItemName;
        /**
         * 检验报告结果状态
         */
        @XmlElement(name = "ReportResultStatus")
        private Byte reportResultStatus;
        /**
         * 标本检验日期
         */
        @XmlElement(name = "SampleTestTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date sampleTestTime;
        /**
         * 检验报告日期
         */
        @XmlElement(name = "ReportTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date reportTime;
        /**
         * 检验申请科室
         */
        @XmlElement(name = "RequestDept")
        private String requestDept;
        /**
         * 申请科室名称
         */
        @XmlElement(name = "RequestDeptName")
        private String requestDeptName;
        /**
         * 检验申请医师代码
         */
        @XmlElement(name = "RequestDoctorCode")
        private String requestDoctorCode;
        /**
         * 检验申请医师姓名
         */
        @XmlElement(name = "RequestDoctorName")
        private String requestDoctorName;
        /**
         * 检验报告科室
         */
        @XmlElement(name = "ReportDept")
        private String reportDept;
        /**
         * 报告审核时间
         */
        @XmlElement(name = "ReportCheckTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date reportCheckTime;
        /**
         * 审核医师签名
         */
        @XmlElement(name = "ReportChecker")
        private String reportChecker;
        /**
         * 报告医师签名
         */
        @XmlElement(name = "ReportDoctor")
        private String reportDoctor;
        /**
         * 标本类别名称
         */
        @XmlElement(name = "SampleTypeName")
        private String sampleTypeName;
        /**
         * 标本状态
         */
        @XmlElement(name = "SampleState")
        private String sampleState;
        /**
         * 检验报告审核意见
         */
        @XmlElement(name = "ReportCheckOpinion")
        private String reportCheckOpinion;
    }

}
